cc.game.onStart = function(){
	if(!cc.sys.isNative && document.getElementById("cocosLoading")) {
    	document.body.removeChild(document.getElementById("cocosLoading"));
    }
    
	gg.userId = cc.sys.localStorage.getItem("userId");
	if (cc.sys.platform == cc.sys.DESKTOP_BROWSER) {
		var userId = $.getQueryString("userId");
		gg.userId = userId;
	} else {
		// 移动
		var userId = cc.sys.localStorage.getItem("userId");
		gg.userId = userId;
	}
    cc.view.enableRetina(false);
    cc.view.adjustViewPort(true);
    cc.view.setDesignResolutionSize(1024, 672, cc.ResolutionPolicy.SHOW_ALL);
    cc.view.resizeWithBrowserSize(true);
    cc.LoaderScene.preload(g_resources_start, function () {
    	gg.init();
    	_ = new PlayMusic();
    	gg.start_load = true;
    	$.runScene(new StartScene());
    }, this);
};
cc.game.run();